package com.gu.enumeration;

/**
 * @ProjectName: apartment-management-center
 * @Package: com.gu.enumeration
 * @ClassName: RepairStatusEnum
 * @Author: gusongliao
 * @Description: 维修状态枚举类
 * @createDate 2021/04/13 21:36
 */
public enum RepairStatusEnum {
    INCOMPLETE(0,"未完成"),
    COMPLETED(1,"已完成"),
    ENGINEER_INVALID(2,"维修人员作废"),
    ENGINEER_COMPLETED(3,"维修人员维修完成"),
    OWNER_COMPLETED(4,"业主确认完成"),
    OWNER_INCOMPLETE(5,"业主否认完成"),
    REPAIRING(6,"正在维修"),
    OWNER_INVALID(7,"业主作废"),
    ;

    private Integer status;
    private String msg;

    RepairStatusEnum(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static String getRepairStatus(Integer status){
        for (RepairStatusEnum value : RepairStatusEnum.values()) {
            if (value.status .equals(status)){
                return value.msg;
            }
        }
        return "";
    }
}
